/* shmem.h : dgnsc dynamic shared memory
 * Copyright (C) 2009-2010 drangon <drangon.zhou@gmail.com>
 * 2009-05
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef INCLUDED_DGNSC_SHMEM_H
#define INCLUDED_DGNSC_SHMEM_H

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

typedef void * dgn_shmem_t;

dgn_shmem_t dgn_shmem_open( const char * name, int size );
int dgn_shmem_get( dgn_shmem_t shm, char ** ret_mem, int * ret_size );
int dgn_shmem_close( dgn_shmem_t shm );

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // INCLUDED_DGNSC_SHMEM_H

